<?php
namespace App\Http\Controllers\Admin;

use App\Service\Admin\UserService;
use Illuminate\Http\Request;

class UserController extends BaseController
{
    //用户

    //游客
    public function visitList(Request $request)
    {
        $res = UserService::visitList();
        if ($res['code'] < 0) {
            return $this->toJson(-2, $res['msg']);
        }
        return $this->toJson(0, '', $res['data'], $res['total']);
    }

    //微信用户
    public function wxList(Request $request)
    {
        $res = UserService::wxList();
        if ($res['code'] < 0) {
            return $this->toJson(-2, $res['msg']);
        }
        return $this->toJson(0, '', $res['data'], $res['total']);
    }
}